package definitions;

/**
 * Class to define all Constats used in this application (except Design
 * Constants).
 * 
 * @author MK
 * 
 */
public class Constants {

	public static final String EVENT_CAMP = "EVENT_CAMP";
	public static final String EVENT_GAME = "EVENT_GAME";
	public static final String EVENT_OTHER_APPOINTMENT = "EVENT_OTHER_APPOINTMENT";
	public static final String EVENT_TOURNAMENT = "EVENT_TOURNAMENT";
	public static final String EVENT_TRAINING = "EVENT_TRAINING";

	public static final String GAME_FIXTURE = "GAME_FIXTURE";
	public static final String GAME_FRIENDLY = "GAME_FRIENDLY";

	public static final String LOGO_PANEL = "LOGO_PANEL";

	public static final String POSITION_DEFENDER = "POSITION_DEFENDER";
	public static final String POSITION_GOALKEEPER = "POSITION_GOALKEEPER";
	public static final String POSITION_MIDFIELDER = "POSITION_MIDFIELDER";
	public static final String POSITION_STRIKER = "POSITION_STRIKER";

	public static final String ROLE_COACH = "ROLE_COACH";
	public static final String ROLE_PLAYER = "ROLE_PLAYER";

	public static final String STAT_ATTENDANCE_OVERVIEW = "SHOW_STAT_ATTENDANCE_OVERVIEW";
	public static final String STAT_RATING_AVERAGE_OVERVIEW = "SHOW_STAT_RATING_AVERAGE_OVERVIEW";
	
	public static final String STATE_HEALTHY = "STATE_HEALTHY";
	public static final String STATE_INJURED = "STATE_INJURED";
	public static final String STATE_OTHER = "STATE_OTHER";
	public static final String STATE_SUSPENDED = "STATE_SUSPENDED";
	public static final String STATE_VACATIONED = "STATE_VACATIONED";

	public static final String TRAINING_NORMAL = "TRAINING_NORMAL";
	public static final String TRAINING_STAMINA = "TRAINING_STAMINA";

	public static int getConstantAsInt(String stringConstant) {

		if (stringConstant.equals(POSITION_GOALKEEPER)) {
			return 0;
		} else if (stringConstant.equals(POSITION_DEFENDER)) {
			return 1;
		} else if (stringConstant.equals(POSITION_MIDFIELDER)) {
			return 2;
		} else if (stringConstant.equals(POSITION_STRIKER)) {
			return 3;
		} else if (stringConstant.equals(ROLE_COACH)) {
			return 1;
		} else if (stringConstant.equals(ROLE_PLAYER)) {
			return 0;
		} else if (stringConstant.equals(GAME_FRIENDLY)) {
			return 1;
		} else if (stringConstant.equals(GAME_FIXTURE)) {
			return 0;
		} else if (stringConstant.equals(STATE_HEALTHY)) {
			return 0;
		} else if (stringConstant.equals(STATE_INJURED)) {
			return 1;
		} else if (stringConstant.equals(STATE_SUSPENDED)) {
			return 2;
		} else if (stringConstant.equals(STATE_VACATIONED)) {
			return 3;
		} else if (stringConstant.equals(STATE_OTHER)) {
			return 4;
		} else if (stringConstant.equals(TRAINING_NORMAL)) {
			return 0;
		} else if (stringConstant.equals(TRAINING_STAMINA)) {
			return 1;
		} else if (stringConstant.equals(EVENT_GAME)) {
			return 0;
		} else if (stringConstant.equals(EVENT_TRAINING)) {
			return 1;
		} else if (stringConstant.equals(EVENT_TOURNAMENT)) {
			return 2;
		} else if (stringConstant.equals(EVENT_CAMP)) {
			return 3;
		} else if (stringConstant.equals(EVENT_OTHER_APPOINTMENT)) {
			return 4;
		} else {
			return -1;
		}
	}
}